package com.ruoyi.web.controller.carbon;

import com.ruoyi.carbon.domain.YikuInfo;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.carbon.service.YikuInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/carbon/yikuInfo")
@Anonymous
public class YikuInfoController extends BaseController {

    @Autowired
    private YikuInfoService yikuInfoService;

    @GetMapping("/list")
    public TableDataInfo list(YikuInfo yikuInfo) {
        startPage();
        List<YikuInfo> list = yikuInfoService.getYikuList(yikuInfo);
        return getDataTable(list);
    }

    @DeleteMapping("/{ids}")
    public AjaxResult delete(@PathVariable Long[] ids) {
        return toAjax(yikuInfoService.delByIds(ids));
    }
}
